package hong.jun.pet_home.controller.utilaudit;

import hong.jun.pet_home.domain.org.Department;
import hong.jun.pet_home.domain.org.Employee;
import hong.jun.pet_home.domain.org.Shop;
import hong.jun.pet_home.service.org.IDepartmentService;
import hong.jun.pet_home.service.org.IEmployeeService;
import hong.jun.pet_home.service.org.IShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/drop_down")
public class Drop_down_Controller {
    @Autowired
    private IEmployeeService employeeService;
    @Autowired
    private IDepartmentService departmentService;
    @Autowired
    private IShopService shopService;

    @GetMapping("/employee")
    public List<Employee> getAllemployee() {
        return employeeService.getAll();
    }

    @GetMapping("/department")
    public List<Department> getAlldepartment() {
        return departmentService.getAll();
    }

    @GetMapping("/pars")
    public List<Department> departmentpars() {
        return departmentService.departmentpars();
    }

    @GetMapping("/shop")
    public List<Shop> shops() {
        return shopService.getAll();
    }
}
